home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / hypercrd / hc2_x / tcprogud.sit / TC Prog Guide / card_52411.txt < prev    next >
Text File  |  1991-02-27  |  929b  |  34 lines

  1. -- card: 52411 from stack: in
  2. -- bmap block id: 0
  3. -- flags: 0000
  4. -- background id: 4755
  5. -- name: 
  6.  
  7.  
  8. -- part contents for background part 6
  9. ----- text -----
  10. 7.3  Conditional Compilation
  11.  
  12. -- part contents for background part 4
  13. ----- text -----
  14. Often it is desired that a program compile correctly under two or more different circumstances.  In such cases, it is convenient to write a single collection of source and header files, using preprocessor directives to ensure correct compilation for the respective circumstances.  The syntax:
  15.  
  16.     # define      NAME                 /* no replacement text given */
  17.  
  18. is used to "define" a name for use with the CONDITIONAL COMPILATION directives:
  19.  
  20.     # ifdef      NAME
  21.            .
  22.            .
  23.     # else
  24.            .
  25.            .
  26.     # endif
  27.  
  28. If NAME has been "defined" before the #ifdef directive is encountered, then the
  29.  
  30.  
  31.  
  32. -- part contents for background part 7
  33. ----- text -----
  34. 180